﻿
using BankDbHelper;

namespace G3WebERPApi.Common
{
    public static class StaticDbHelper
    {
        //private static readonly object locker = new object();
        //public static BankSqlHelper GetSqlHelper()
        //{
        //    string connectionString = ToolsClass.GetConfig("DataOnLine");
        //    if (bankSqlHelper == null)
        //    {
        //        lock (locker)
        //        {
        //            if (bankSqlHelper == null)
        //            {
        //                bankSqlHelper = new BankSqlHelper(connectionString,DBTypeEnum.SqlServer);
        //            }
        //        }
        //    }
        //    return bankSqlHelper;
        //}

        //public static BankSqlHelper bankSqlHelper;

       
        public static BankSqlHelper GetSqlHelper()
        {
            string connectionString = ToolsClass.GetConfig("DataOnLine");
             return new BankSqlHelper(connectionString, DBTypeEnum.SqlServer);

        }


    }
}